package com.handinfo.android;

import android.os.Build;

public class DWSystem
{
	private static String Build_Brand;
	private static String Build_Model;
	private static String Build_Product;
	private static String Build_Version_Release;
	private static String Build_Version_SDK;
	private static String Build_Device;

	private static final int OS_15 = 0;
	private static final int OS_16 = 1;
	private static final int OS_20 = 2;
	private static final int OS_21 = 3;
	private static final int OS_22 = 4;
	private static final int OS_23 = 5;
	private static final int OS_30 = 6;

	private static final int[] OS_VERSION_FLAG = {
			OS_15,
			OS_16,
			OS_20,
			OS_21,
			OS_22,
			OS_23,
			OS_30
	};

	private static final String[] OS_VERSION_DESP = {
			"1.5",
			"1.6",
			"2.0",
			"2.1",
			"2.2",
			"2.3",
			"3.0"
	};

	private static int OS_Version;

	static {
		Build_Brand = Build.BRAND.toLowerCase();
		Build_Model = Build.MODEL.toLowerCase();
		Build_Product = Build.PRODUCT.toLowerCase();
		Build_Version_Release = Build.VERSION.RELEASE;
		Build_Version_SDK = Build.VERSION.SDK;
		Build_Device = Build.DEVICE;

		for (int i = 0; i < OS_VERSION_DESP.length; i++) {
			if (Build_Version_Release.indexOf(OS_VERSION_DESP[i]) != -1) {
				OS_Version = OS_VERSION_FLAG[i];
				break;
			}
		}

	}

	public static String getBuild_Brand()
	{
		return Build_Brand;
	}

	public static String getBuild_Model()
	{
		return Build_Model;
	}

	public static String getBuild_Product()
	{
		return Build_Product;
	}

	public static String getBuild_Version_Release()
	{
		return Build_Version_Release;
	}

	public static String getBuild_Version_SDK()
	{
		return Build_Version_SDK;
	}

	public static String getBuild_Device()
	{
		return Build_Device;
	}

	public static int getOS_Version()
	{
		return OS_Version;
	}

}
